package com.sg.controllor;


import com.sg.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import javax.annotation.Resource;

@Controller
@RequestMapping("/user")
public class UserController {
    Logger log =LogManager.getLogger(UserController.class);


    @Resource
    private UserService userService ;


    @RequestMapping(value="/test",method={RequestMethod.GET,RequestMethod.POST})
    public String test() {
        userService.findAll();
        log.info("开始接受请求....");
        return "index";
    }


}
